package rest.jbpm.wrappers.refs;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@XmlType(name="deployment")
public class DeploymentRef {
	
	private static String base;
	private String deploymentId;
	private static Logger log = LoggerFactory.getLogger(DeploymentRef.class);
	
	protected DeploymentRef() {
	}
	
	public DeploymentRef(String deploymentId, String baseUri) {
		
		this.deploymentId = deploymentId;
		this.base = baseUri;
		
	}
	
	@XmlAttribute(name="ref", required=true)
	public String getDeploymen() {
		return base + "repo/deployment/" + deploymentId;
	}

}
